<template>
  <div class="container containerBox">
    <el-row class="topTitleBox">
      <el-col :span="16" class="topTitle">
        <i class="icon iconfont iconfanhui1" @click="goBack"></i>
        {{ isQy ? '申报' : '审核' }}项目：{{ projectInfo.projectName }}
        <el-tag
          type="success"
          class="tag-item"
          style="background: #5fab2b; border-color: #5fab2b"
          v-show="projectInfo.statusDesc == '已通过'"
          >已通过</el-tag
        >
        <el-tag
          type="info"
          class="tag-item"
          style="background: #e02020; border-color: #e02020"
          v-show="projectInfo.statusDesc == '已驳回'"
          >已驳回</el-tag
        >
        <el-tag
          type="warning"
          class="tag-item"
          style="background: #a0a0a0; border-color: #a0a0a0"
          v-show="projectInfo.statusDesc == '已取消'"
          >已取消</el-tag
        >
        <el-tag
          type="warning"
          class="tag-item"
          style="background: #ffc200; border-color: #ffc200"
          v-show="projectInfo.statusDesc == '待审核'"
          >待审核</el-tag
        >
      </el-col>
      <el-col :span="8" class="topTitle" style="text-align: right">
        <div style="display: inline-block" v-show="isQy">
          <el-button
            class="commonBut saveBtn funComBut"
            plain
            @click="toCancelDeclare"
            v-show="projectInfo.statusDesc == '待审核' && isShowDel"
            >取消申报</el-button
          >

          <el-button
            class="commonBut saveBtn funComBut"
            plain
            @click="toAddDeclare"
            v-show="
              (projectInfo.statusDesc == '已驳回' ||
                projectInfo.statusDesc == '已取消') &&
              isShowAdd
            "
            >修改</el-button
          >
        </div>
        <el-button
          class="commonBut saveBtn funComBut"
          plain
          @click="toProjectKb"
          v-show="projectInfo.statusDesc == '已通过' && isShowDetail"
          >前往项目看板</el-button
        >
        <el-button
          class="commonBut"
          @click="goBack"
          style="width: auto; padding: 0 15px"
          >返回列表</el-button
        >
      </el-col>
    </el-row>
    <div class="mainCon">
      <el-row>
        <el-col :span="24">
          <detail-header
            v-if="projectInfo.statusDesc == '已驳回'"
            :status="3"
            :infoList="[{ title: '驳回原因', value: projectInfo.reason }]"
          ></detail-header>
          <!-- <div v-show="projectInfo.statusDesc == '已驳回'" style="font-size: 24px;font-weight: 700;padding: 16px 0 0px 24px">
            <i class="el-icon-warning" style="color:rgb(224, 32, 32)"></i>
            驳回原因：{{projectInfo.reason}}
          </div> -->
        </el-col>
      </el-row>
      <div style="padding: 20px 24px 30px; border-bottom: 1px solid #dbdbdb">
        <el-row>
          <el-col :span="24">
            <div class="secondaryTitle secondaryTitleTheme">项目基本信息</div>
          </el-col>
        </el-row>
        <el-row class="detailInfo">
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目名称：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.projectName || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >施工许可证：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.license || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目状态：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.projectStatusDesc || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >所属区域：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">
                {{ projectInfo.provinceName }}{{ projectInfo.cityName
                }}{{ projectInfo.countyName }}
                <span
                  v-show="projectInfo.countyName !== projectInfo.areaName"
                  >{{ projectInfo.areaName }}</span
                >
              </span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >所属行业：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.industryName || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >投资类别：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.investmentDesc || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >工程造价：</span
              >
              <span class="gridContent contentSty color666 fontSizeF"
                >{{ projectInfo.total }}元</span
              >
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >开工日期：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.startDate || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >建设周期：</span
              >
              <span class="gridContent contentSty color666 fontSizeF"
                >{{ projectInfo.cycle }}天</span
              >
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >工程类型：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.typeName || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目部详细地址：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.address || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty" v-if="isWhUser()">
              <span class="gridContent color333 fontSizeF fontWeight"
                >是否国企施工项目：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.isStateOwnedConDesc || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >施工地址：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.constructLocation || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty" v-if="isXiangYangUser()">
              <span class="gridContent color333 fontSizeF fontWeight"
                >合同签订日：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.contractSignDate || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty" v-if="isWhUser()">
              <span class="gridContent color333 fontSizeF fontWeight"
                >施工许可证附件：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">
                <span v-if="upLoadFileLicense.length > 0">
                  <span>已上传</span>
                  <el-link
                    type="primary"
                    class="seeSty"
                    @click="toUploadFileLicense()"
                    >查看</el-link
                  >
                  <contractEnclosureDialog
                    v-if="uploadLicense"
                    dialogTitle="施工许可证附件"
                    :tableData="upLoadFileLicense"
                    @closeDialog="hiddenDialogLicense"
                  ></contractEnclosureDialog>
                </span>
                <span v-else>未上传</span>
              </span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >工资发放日：</span
              >
              <span class="gridContent contentSty color666 fontSizeF"
                >每月{{ projectInfo.salaryDate || '--' }}号</span
              >
            </el-col>
          </el-row>
        </el-row>
      </div>
      <div style="padding: 20px 24px 30px; border-bottom: 1px solid #dbdbdb">
        <el-row>
          <el-col :span="24">
            <div class="secondaryTitle secondaryTitleTheme">建设方信息</div>
          </el-col>
        </el-row>
        <el-row class="detailInfo">
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >单位名称：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pcName || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >统一社会信用代码：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pcUscc || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight">
                项目负责人<el-tooltip
                  content="Top center"
                  placement="top"
                  effect="dark"
                >
                  <span slot="content">业主单位负责管理该项目的人员</span>
                  <i class="icon iconfont iconhuabanfuben"></i>
                </el-tooltip>
                ：
              </span>
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pcLeader || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >负责人手机号码：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pcLeaderTel || '--'
              }}</span>
            </el-col>
          </el-row>
        </el-row>
      </div>
      <div style="padding: 20px 24px 30px; border-bottom: 1px solid #dbdbdb">
        <el-row>
          <el-col :span="24">
            <div class="secondaryTitle secondaryTitleTheme">施工方信息</div>
          </el-col>
        </el-row>
        <el-row class="detailInfo">
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >单位名称：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pbName || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >统一社会信用代码：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.pbUscc || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight">
                项目负责人<el-tooltip
                  content="Top center"
                  placement="top"
                  effect="dark"
                >
                  <span slot="content"
                    >施工单位负责管理项目的人员，建档后项目账号将发送至负责人手机号</span
                  >
                  <i class="icon iconfont iconhuabanfuben"></i>
                </el-tooltip>
                ：
              </span>
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.leader || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >负责人手机号码：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.leaderTel || '--'
              }}</span>
            </el-col>
          </el-row>
        </el-row>
      </div>
      <div style="padding: 20px 24px 30px; border-bottom: 1px solid #dbdbdb">
        <el-row>
          <el-col :span="24">
            <div class="secondaryTitle secondaryTitleTheme">项目经理信息</div>
          </el-col>
        </el-row>
        <el-row class="detailInfo">
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目经理姓名：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.managerName || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目经理身份证号：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.managerIdcard || '--'
              }}</span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目经理手机号：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">{{
                projectInfo.managerTel || '--'
              }}</span>
            </el-col>
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目经理资格证书：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">
                <span v-if="managerUpLoadFile.length > 0">
                  <span>已上传</span>
                  <el-link type="primary" class="seeSty" @click="toUploadFile()"
                    >查看</el-link
                  >
                  <contractEnclosureDialog
                    v-if="uploadContract"
                    dialogTitle="项目经理资格证书"
                    :tableData="managerUpLoadFile"
                    @closeDialog="hiddenDialog"
                  ></contractEnclosureDialog>
                </span>
                <span v-else>未上传</span>
              </span>
            </el-col>
          </el-row>
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >项目经理企业任命文件：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">
                <span v-if="managerAppointFiles.length > 0">
                  <span>已上传</span>
                  <el-link
                    type="primary"
                    class="seeSty"
                    @click="toUploadFileAppoint()"
                    >查看</el-link
                  >
                  <contractEnclosureDialog
                    v-if="uploadContractAppoint"
                    dialogTitle="项目经理企业任命文件"
                    :tableData="managerAppointFiles"
                    @closeDialog="hiddenDialogAppoint"
                  ></contractEnclosureDialog>
                </span>
                <span v-else>未上传</span>
              </span>
            </el-col>
          </el-row>
        </el-row>
      </div>
      <div style="padding: 20px 24px 30px">
        <el-row>
          <el-col :span="24">
            <div class="secondaryTitle secondaryTitleTheme">合同信息</div>
          </el-col>
        </el-row>
        <el-row class="detailInfo">
          <el-row class="detailInfoItemSty">
            <el-col :span="12" class="labelWidthSty">
              <span class="gridContent color333 fontSizeF fontWeight"
                >合同附件：</span
              >
              <span class="gridContent contentSty color666 fontSizeF">
                <span v-if="upLoadFile.length > 0">
                  <span>已上传</span>
                  <el-link
                    type="primary"
                    class="seeSty"
                    @click="toUploadFileTwo()"
                    >查看</el-link
                  >
                  <contractEnclosureDialog
                    v-if="uploadContractTwo"
                    dialogTitle="项目合同附件"
                    :tableData="upLoadFile"
                    @closeDialog="hiddenDialogTwo"
                  ></contractEnclosureDialog>
                </span>
                <span v-else>未上传</span>
              </span>
            </el-col>
          </el-row>
        </el-row>
      </div>
      <el-row
        style="padding: 30px 0; border-top: 1px solid #dbdbdb"
        v-show="!isQy && projectInfo.statusDesc == '待审核'"
      >
        <el-col :span="12" style="text-align: right">
          <el-button
            class="submitBtn listAddBtn"
            size="medium"
            @click="toPass"
            v-show="isShowUpdate"
            :loading="loadingPass"
            >通过申报</el-button
          >
        </el-col>
        <el-col :span="12">
          <el-button
            class="cancelBtn rejectFrom"
            size="medium"
            @click="reject"
            v-show="isShowUpdate"
            :loading="loadingReject"
            >驳回申报</el-button
          >
        </el-col>
      </el-row>
    </div>
    <!-- 弹窗 -->
    <!--新增人员-->
    <el-dialog
      title="驳回申报"
      :visible.sync="formVisible"
      :close-on-click-modal="false"
      @close="closeDialog"
      custom-class="brand-dialog-min-width"
      width="45%"
      :modal-append-to-body="false"
    >
      <el-form
        :model="formData"
        label-width="80px"
        :rules="formRules"
        ref="formData"
      >
        <el-form-item label="驳回原因" class="row-padding-bottom" prop="reason">
          <el-input
            type="textarea"
            v-model="formData.reason"
            @blur="formData.reason = changeValue($event)"
            maxlength="200"
            show-word-limit
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="handleClose" class="cancel">取消</el-button>
        <el-button
          type="primary"
          @click.native="addRejectSubmit"
          class="save"
          :loading="isAddRejectLoading"
          >提交</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
import detailHeader from '../publicCom/detailHeader.vue'
export default {
  name: 'projectDeclareDetail',
  components: { detailHeader },
  data() {
    return {
      id: '',
      isDelFile: false,
      projectInfo: '',
      formVisible: false,
      formData: {
        reason: '',
        // remark: ""
      },
      formRules: {
        //添加人员表单验证
        reason: [
          { required: true, message: '请输入驳回原因', trigger: 'change' },
        ],
      },
      isAddRejectLoading: false,
      isQy: false,
      upLoadFile: [],
      srcList: [],
      oldSrcList: [],
      isShowDel: '',
      isShowUpdate: '',
      isShowDetail: '',
      isShowAdd: '',
      loadingPass: false,
      loadingReject: false,
      managerSrcList: [],
      managerOldSrcList: [],
      fileMarginLeft: '30', //详情文件居左样式
      uploadContract: false,
      uploadContractTwo: false,
      managerUpLoadFile: [],
      upLoadFileLicense: [], //施工许可证附件
      uploadLicense: false,
      managerAppointFiles: [],
      uploadContractAppoint: false,
    }
  },
  created() {
    if (this.$route.query.path == 'home') {
      this.$store.commit('set_active_index', '/home/project/projectDeclareList')
      this.$store.state.activeMenu = '/home/project/projectDeclareList'
      this.$store.commit('GOBACK_NAME', {
        oldUrl: '/home/project/projectDeclareList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    } else if (this.$route.query.path == 'constructMonitorHome') {
      this.$store.commit('set_active_index', '/home/project/projectAuditList')
      this.$store.state.activeMenu = '/home/project/projectAuditList'
      this.$store.commit('GOBACK_NAME', {
        oldUrl: '/home/project/projectAuditList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    }
    this.id = this.$route.query.id
    // this.id = "4028898d6e7943de016e794c03f90001";
    this.isQy =
      localStorage.getItem('loginType') == 'QY' ||
      localStorage.getItem('loginType') === 'XM'
        ? true
        : false
    this.getProlectInfo()
    this.isShowAdd =
      this.$store.state.buttonLimitsArr.indexOf('projectAudit:add') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('projectDeclareList:add') > -1
    this.isShowUpdate =
      this.$store.state.buttonLimitsArr.indexOf('projectAudit:update') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('projectDeclareList:update') >
        -1
    this.isShowDel =
      this.$store.state.buttonLimitsArr.indexOf('projectAudit:delete') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('projectDeclareList:delete') >
        -1
    this.isShowDetail =
      this.$store.state.buttonLimitsArr.indexOf('mProjectList:detail') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('projectList:detail') > -1
  },
  computed: {
    mianConTop: function () {
      return this.projectInfo.statusDesc == '已驳回' ? '5px' : '20px'
    },
  },
  methods: {
    getProlectInfo() {
      this.axios({
        method: 'post',
        url: 'api-p/projectapplication/expand/finddetailbyid',
        data: {
          id: this.id,
        },
      })
        .then(
          (response) => {
            if (!response.data.hasError) {
              this.projectInfo = response.data.result
              if (
                localStorage.getItem('loginType') == 'JC' &&
                response.data.result.statusDesc == '已取消'
              ) {
                this.goBack()
              }
              this.upLoadFile = this.projectInfo.contractFiles
              this.managerUpLoadFile = this.projectInfo.managerFiles
              this.upLoadFileLicense = this.projectInfo.licenseFilesView || []
              this.managerAppointFiles = this.projectInfo.managerAppointFiles
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'error',
              })
            }
            this.loadingPass = false
            this.loadingReject = false
          },
          (response) => {}
        )
        .catch((error) => {
          this.loadingPass = false
          this.loadingReject = false
        })
    },
    toCancelDeclare() {
      this.$confirm('取消申报后需重新提交申报，请谨慎操作?', '取消申报', {
        cancelButtonClass: 'btn-custom-cancel',
        type: 'warning',
      })
        .then(() => {
          this.cancelDeclare()
        })
        .catch(() => {
          // this.$message.error("删除失败");
        })
    },
    cancelDeclare() {
      this.axios({
        method: 'post',
        url: 'api-p/projectapplication/expand/cancel',
        data: {
          id: this.id,
        },
      })
        .then(
          (response) => {
            if (!response.data.hasError) {
              this.$message({
                message: '取消成功',
                type: 'success',
              })
              this.getProlectInfo()
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'error',
              })
            }
          },
          (response) => {}
        )
        .catch((error) => {})
    },
    toAddDeclare() {
      // let data = {
      //   id: this.id,
      //   projectName: this.projectInfo.projectName, //项目名称
      //   license: this.projectInfo.license, //施工许可证
      //   projectStatus: this.projectInfo.projectStatus, //项目状态
      //   areaId: this.projectInfo.areaId, //所属区域
      //   industry: this.projectInfo.industryId, //所属行业
      //   category: this.projectInfo.investment, //投资类别
      //   projectCost: this.projectInfo.total, //工程造价
      //   startDate: this.projectInfo.startDate, //开工日期
      //   constructionCycle: this.projectInfo.cycle, //建设周期
      //   detailAddress: this.projectInfo.address, //详细地址
      //   projectType: this.projectInfo.typeId, //工程类型
      //   unitName: this.projectInfo.pcName, //建设方单位名称
      //   jsUscc: this.projectInfo.pcUscc, //建设方统一社会信用代码
      //   pbName: this.projectInfo.pbName, //施工方单位名称
      //   pbUscc: this.projectInfo.pbUscc, //施工方统一社会信用代码\
      //   proManagerName: this.projectInfo.managerName,
      //   proManagerCard: this.projectInfo.managerIdcard,
      //   proManagerTel: this.projectInfo.managerTel,
      //   salaryDay: this.projectInfo.salaryDate,
      //   cityId:this.projectInfo.cityId,
      //   countyId:this.projectInfo.countyId,
      //   provinceId:this.projectInfo.provinceId,
      //   lon:this.projectInfo.lon,
      //   lat:this.projectInfo.lat
      //
      // };
      this.$router.push({
        path: '/home/monitorProjectManagement/newProjectApplication',
        name: 'newProjectApplication',
        query: {
          projectData: this.id,
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/project/projectDeclareList',
        newUrl: this.$router.currentRoute.fullPath,
      })
      // this.axios({
      //   method: "post",
      //   url: "api-p/projectapplication/expand/add",
      //   data: {
      //     id: this.id,
      //     projectName: this.projectInfo.projectName, //项目名称
      //     license: this.projectInfo.license, //施工许可证
      //     projectStatus: this.projectInfo.projectStatus, //项目状态
      //     areaId: this.projectInfo.areaId, //所属区域
      //     industryId: this.projectInfo.industryId, //所属行业
      //     investment: this.projectInfo.investment, //投资类别
      //     total: this.projectInfo.total, //工程造价
      //     startDate: this.projectInfo.startDate, //开工日期
      //     cycle: this.projectInfo.cycle, //建设周期
      //     address: this.projectInfo.address, //详细地址
      //     typeId: this.projectInfo.typeId, //工程类型
      //     pcName: this.projectInfo.pcName, //建设方单位名称
      //     pcUscc: this.projectInfo.pcUscc, //建设方统一社会信用代码
      //     pbName: this.projectInfo.pbName, //施工方单位名称
      //     pbUscc: this.projectInfo.pbUscc, //施工方统一社会信用代码\
      //     managerName: this.projectInfo.managerName,
      //     managerIdcard: this.projectInfo.managerIdcard,
      //     managerTel: this.projectInfo.managerTel,
      //     salaryDate: this.projectInfo.salaryDate
      //   }
      // })
      //   .then(
      //     response => {
      //       if (!response.data.hasError) {
      //         this.$message({
      //           message: "重新提交成功",
      //           type: "success"
      //         });
      //         this.getProlectInfo();
      //       } else {
      //         this.$message({
      //           message: response.data.errorMsg,
      //           type: "error"
      //         });
      //       }
      //     },
      //     response => {
      //     }
      //   )
      //   .catch(error => {
      //   });
    },
    toPass() {
      this.loadingPass = true
      this.$confirm(
        '申报通过后该企业即可管理该项目，录入实名制以及发放工资。',
        '项目申报',
        {
          cancelButtonClass: 'btn-custom-cancel',
          type: 'warning',
        }
      )
        .then(() => {
          this.pass('APPROVED')
        })
        .catch(() => {
          this.loadingPass = false
        })
    },
    pass(type) {
      this.axios({
        method: 'post',
        url: 'api-p/projectapplication/expand/editauditbymonitor',
        data: {
          id: this.id,
          modifyType: type,
          reason: '',
        },
      })
        .then(
          (response) => {
            if (!response.data.hasError) {
              this.$message({
                message: '操作成功',
                type: 'success',
              })
              this.getProlectInfo()
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'error',
              })
              this.loadingPass = false
            }
          },
          (response) => {}
        )
        .catch((error) => {
          this.loadingPass = false
        })
    },
    closeDialog() {},
    handleClose() {
      this.loadingReject = false
      this.formVisible = false
      this.$refs['formData'].resetFields()
    },
    addRejectSubmit() {
      this.$refs.formData.validate((valid) => {
        if (valid) {
          this.isAddRejectLoading = true
          this.addReject('REJECT')
        } else {
          return false
        }
      })
    },
    addReject(type) {
      var data = {
        id: this.id,
        modifyType: type,
      }
      data = Object.assign(data, this.formData)
      this.axios({
        method: 'post',
        url: 'api-p/projectapplication/expand/editauditbymonitor', //监察端项目申报审核接口(通过、已驳回)（BY CGQ）
        data: data,
      })
        .then(
          (response) => {
            this.isAddRejectLoading = false
            if (!response.data.hasError) {
              this.$message({
                message: '驳回成功',
                type: 'success',
              })
              this.getProlectInfo()
              this.formVisible = false
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'warning',
              })
              this.loadingReject = false
            }
          },
          (response) => {
            this.isAddRejectLoading = false
            this.$message({
              message: '数据请求失败',
              type: 'warning',
            })
          }
        )
        .catch((error) => {
          this.isAddRejectLoading = false
        })
    },
    //跳转详情
    toProjectKb() {
      //row.pb true是施工方账号
      var companyType = ''
      if (this.projectInfo.pb === true) {
        companyType = 'SG'
      } else {
        companyType = 'JS'
      }
      let userType = localStorage.getItem('loginType')
      //   if("QY"===userType) {
      //     this.$router.push({
      //       path: "/home/companyProjectManage/projectDetailQY",
      //       name: "projectDetailQY",
      //       query: {
      //         projectId: this.projectInfo.projectId,
      //         companyType: companyType,
      //         //path:"projectDeclareDetail",
      //         projectDeclareDetailId:this.id
      //       }
      //     });
      //     this.$store.commit("CHANGE_SLIDER_NAME", {
      //       oldUrl: "/home/project/projectListQY",
      //       newUrl: this.$router.currentRoute.fullPath
      //     });
      //   }else{
      //     // this.addProjectInfoTab();
      //     this.$nextTick(function(){
      //       this.$router.push({
      //         path: "/home/monitorProjectManagement/projectDetail",
      //         name: "projectDetail",
      //         query: {
      //           projectId: this.projectInfo.projectId,//"ff8080816eacec80016eafea00fb0005",
      //           companyType: companyType,
      //           id: this.id,
      //           type:"projectDetail"
      //         }
      //       });
      //       this.$store.commit("CHANGE_SLIDER_NAME", {
      //         // oldUrl: "/home/project/projectAuditList",
      //         oldUrl:"/home/project/projectList",
      //         newUrl: this.$router.currentRoute.fullPath
      //       });
      //     })
      //   }
      this.$router.push({
        path: '/home/monitorProjectManagement/projectDetail',
        name: 'projectDetail',
        query: {
          companyType: companyType,
          projectId: this.projectInfo.projectId,
        },
      })
      if (userType === 'QY') {
        this.$store.commit('CHANGE_SLIDER_NAME', {
          oldUrl: '/home/project/projectListQY',
          newUrl: this.$router.currentRoute.fullPath,
        })
      } else {
        //返回到监察端的项目列表
        this.$store.commit('CHANGE_SLIDER_NAME', {
          oldUrl: '/home/project/projectList',
          newUrl: this.$router.currentRoute.fullPath,
        })
      }
    },
    goBack() {
      let userType = localStorage.getItem('loginType')
      if ('QY' === userType || 'XM' === userType) {
        this.$router.push({
          path: '/home/project/projectDeclareList',
        })
        this.$store.commit('CHANGE_SLIDER_NAME', {
          oldUrl: '/home/project/projectDeclareList',
          newUrl: this.$router.currentRoute.fullPath,
        })
      } else {
        const {
          projectName,
          status,
          applyStartDate,
          applyEndDate,
          areaId,
          industryId,
          pageNos,
        } = this.$route.query
        this.$router.push({
          path: '/home/project/projectAuditList',
          query: {
            projectName,
            status,
            applyStartDate,
            applyEndDate,
            areaId,
            industryId,
            pageNos,
          },
        })
        this.$store.commit('GOBACK_NAME', {
          oldUrl: '/home/project/projectAuditList',
          newUrl: this.$router.currentRoute.fullPath,
        })
      }
    },
    // 驳回
    reject() {
      this.loadingReject = true
      this.formVisible = true
    },
    toUploadFile() {
      this.uploadContract = true
    },
    hiddenDialog() {
      this.uploadContract = false
    },
    toUploadFileTwo() {
      this.uploadContractTwo = true
    },
    hiddenDialogTwo() {
      this.uploadContractTwo = false
    },
    //施工许可证
    toUploadFileLicense() {
      this.uploadLicense = true
    },
    hiddenDialogLicense() {
      this.uploadLicense = false
    },
    toUploadFileAppoint() {
      this.uploadContractAppoint = true
    },
    hiddenDialogAppoint() {
      this.uploadContractAppoint = false
    },
  },
}
</script>

<style scoped lang="less">
.rejectFrom {
  background-color: #3e5265;
  border-color: #3e5265;
  color: #fff;
  /* margin-left: 5px; */
  &:hover {
    background-color: #3e5265 !important;
    border-color: #3e5265 !important;
    color: #fff !important;
    opacity: 0.8;
  }
}
.submitBtn {
  margin: 0;
}
.topTitleBox {
  padding: 0 24px;
}
.topTitle {
  height: 50px;
  /* background-color: #e4ebf1; */
  /* padding-left: 24px; */
  font-weight: bold;
  font-size: 18px;
  line-height: 50px;
  position: relative;
  &:after {
    position: absolute;
    right: -24px;
    top: 50px;
    left: -24px;
    height: 1px;
    content: '';
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    background-color: #e3e7e9;
    z-index: 10;
  }
}

.topTitle1 {
  height: 67px;
  background-color: #e4ebf1;
  padding-left: 24px;
  font: bold 18px Microsoft YaHei;
  padding-top: 5px;
}
.container {
  padding: 0;
  overflow: hidden;
}
.mainCon {
  padding-top: 0;
}
.subTitleBox {
  padding: 12px;
  padding-left: 0;
  border-bottom: 1px solid #dbdbdb;
}
.blockquote {
  color: #333;
  font: bold 16px Microsoft YaHei;
  border-bottom: 1px solid #dee5f4;
  height: 35px;
  margin-top: 14px;
}

.blockquote:before {
  background-color: #009588;
  content: '';
  padding: 2px;
  margin-right: 10px;
}

.labelWidth {
  width: 126px;
  font-size: 14px;
  color: #666666;
  display: inline-block;
  height: 36px;
  text-align: right;
}

.information {
  /* font-size: 14px;
    color: #151515; */
  font-size: 14px;
  color: #151515;
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detailInfo {
  padding: 0;
}

.detailInfoItem {
  margin-top: 28px;
}

.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.tag-item {
  color: #ffffff !important;
  font-size: 12px;
  border-radius: 0px;
  height: 20px;
  line-height: 18px;
  width: 48px;
  margin-left: 12px;
  padding: 0;
  text-align: center;
}

.imgStyle {
  padding-left: 100px;
  margin-top: 24px;
  li {
    position: relative;
    margin-right: 20px;
    margin-top: 10px;
    i {
      position: absolute;
      right: -6px;
      top: -10px;
      font-size: 20px;
    }
  }
}

.manFiles {
  line-height: 14px;
  margin-top: -12px;
}

.seeSty {
  margin-top: -2px;
}
</style>
